package com.sye.proxymodule.staticc;

/**
 * 代理对象
 */
public class ProxyObject implements AbstractObject{
    AbstractObject realObject;

    public ProxyObject(AbstractObject realObject){
        this.realObject=realObject;
    }


    public void operation() {
        //在调用目标对象之前，完成一些操作
        System.out.println("Before Do Something");
        realObject.operation();
        //在调用目标对象之后，完成一些操作
        System.out.println("After Do Something");
    }
}
